home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 January / macformat-020.iso / Shareware City / Developers / MungeImage Source 1.2.0 / DART Interfaces / DartIntf.p < prev    next >
Encoding:
Text File  |  1994-08-15  |  2.7 KB  |  91 lines  |  [TEXT/PJMM]

  1. {    File:        DartIntf.p}
  2.  
  3. {    Written by:    Ken McLeod}
  4.  
  5. {    Copyright:    © 1987-1994 by Apple Computer, Inc.}
  6. {                All rights reserved.}
  7.  
  8. {    Version:    1.5.3}
  9. {    Created:    Wednesday, August 3, 1994 16:00}
  10.  
  11. {    Changed: srcCmp and srcType fields changed to Byte to make life easier for all.  [JJQ] & [PNL] }
  12.  
  13. unit DartIntf;
  14.  
  15. interface
  16.  
  17.     const
  18. (*----------------------------------------------------------------------}
  19. {    disk identifiers}
  20. {----------------------------------------------------------------------*)
  21.  
  22.         kMacDisk = 1;
  23.         kLisaDisk = 2;
  24.         kAppleIIDisk = 3;
  25.  
  26.         kMacHiDDisk = 16;
  27.         kMSDOSLowDDisk = 17;
  28.         kMSDOSHiDDisk = 18;
  29.  
  30. (*----------------------------------------------------------------------}
  31. {    file types}
  32. {----------------------------------------------------------------------*)
  33.  
  34.         kDartCreator = 'DART';
  35.         kOldFileType = 'DMdf';
  36.         kDartPrefsType = 'DMd0';
  37.         kMac400KType = 'DMd1';
  38.         kLisa400KType = 'DMd2';
  39.         kMac800KType = 'DMd3';
  40.         kApple800KType = 'DMd4';
  41.         kMSDOS720KType = 'DMd5';
  42.         kMac1440KType = 'DMd6';
  43.         kMSDOS1440KType = 'DMd7';
  44.         kDiskCopyType = 'dImg';
  45.  
  46. (*----------------------------------------------------------------------}
  47. {    compression identifiers}
  48. {----------------------------------------------------------------------*)
  49.  
  50.         kRLECompress = 0;    { "fast" algorithm }
  51.         kLZHCompress = 1;    { "best" algorithm }
  52.         kNoCompress = 2;    { not compressed }
  53.  
  54. (*----------------------------------------------------------------------}
  55. {    data structures}
  56. {----------------------------------------------------------------------*)
  57.     type
  58.  
  59.         SrcInfoRec = packed record
  60.                 srcCmp: Byte;        { compression identifier }
  61.                 srcType: Byte;        { disk type identifier (Lisa, Mac, etc.) }
  62.                 srcSize: INTEGER;    { size of source disk in Kb (e.g. 800=800K) }
  63.                 bLength: array[1..40] of INTEGER;    { array of block lengths }
  64.     { variable-length compressed disk data follows... }
  65.             end;
  66.  
  67.         HDSrcInfoRec = packed record
  68.                 srcCmp: Byte;        { compression identifier }
  69.                 srcType: Byte;        { disk type identifier (Lisa, Mac, etc.) }
  70.                 srcSize: INTEGER;    { size of source disk in Kb (e.g. 800=800K) }
  71.                 bLength: array[1..72] of INTEGER;    { array of block lengths }
  72.     { variable-length compressed disk data follows... }
  73.             end;
  74.  
  75.     const
  76.         DDBLOCKSIZE = 20960;    { size of an uncompressed block, in bytes }
  77.  
  78.     type
  79.         DiskData = packed array[1..DDBLOCKSIZE] of CHAR;
  80.         DDPtr = ^DiskData;
  81.  
  82.  
  83. (*----------------------------------------------------------------------}
  84. {    library functions}
  85. {----------------------------------------------------------------------*)
  86.  
  87.     function RLEExpandBlock (theBlock: Ptr; outputBuf: DDPtr; blockLen: INTEGER): OSErr;
  88.     function LZHExpandBlock (theBlock: Ptr; outputBuf: DDPtr; blockLen: INTEGER): OSErr;
  89.  
  90. implementation
  91. end. {DartIntf}